package org.sy.lab.多线程基础._4_执行器._3_分离任务启动和结束的处理;

import java.util.concurrent.CompletionService;

public class Producer implements Runnable {

	private String name;
	private CompletionService<String> service;
	
	public Producer(String name, CompletionService<String> service) {
		this.name = name;
		this.service = service;
	}
	
	@Override
	public void run() {
		Processor processor = new Processor(name);
		service.submit(processor);
	}
}
